﻿using AutoMapper;
using ProductionLine.API.Application.Command.BOM;
using ProductionLine.API.Application.Command.Car;
using ProductionLine.API.Application.Command.Dispatch;
using ProductionLine.API.Application.Command.Plan.Write;
using ProductionLine.Domain.BOM;
using ProductionLine.Domain.Car;
using ProductionLine.Domain.Dispatch;
using ProductionLine.Domain.Plan;
using ProductionLine.Domain.ProductLine;
using ProductionLine.Domain.Site;

namespace ProductionLine.API.Mapper
{
    public class MyMapper : Profile
    {
        public MyMapper()
        {
            //生产计划
            CreateMap<AddPlanCommand,PlanModel>().ReverseMap();
            CreateMap<UpdatePlanCommand, PlanModel>().ReverseMap();

            //车间
            CreateMap<AddCarCommand, CarModel>().ReverseMap();

            //生产线
            CreateMap<AddProductLineCommand, ProductLineModel>().ReverseMap();

            //站点
            CreateMap<AddSiteCommand, SiteModel>().ReverseMap();

            //BOM
            CreateMap<AddBOMCommand, BOMModel>().ReverseMap();

            //工单任务
            CreateMap<AddDispatchCommand, TaskDispatchModel>().ReverseMap();
        }
    }
}
